// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0

package CustomerRelationsManagement;

public final class orderPrxHelper extends Ice.ObjectPrxHelperBase implements orderPrx
{
    public void
    delete()
        throws DBError,
               RecordNotCommitted
    {
        delete(null, false);
    }

    public void
    delete(java.util.Map<String, String> __ctx)
        throws DBError,
               RecordNotCommitted
    {
        delete(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    delete(java.util.Map<String, String> __ctx, boolean __explicitCtx)
        throws DBError,
               RecordNotCommitted
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("delete");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.delete(__ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public int
    getCustomer()
    {
        return getCustomer(null, false);
    }

    public int
    getCustomer(java.util.Map<String, String> __ctx)
    {
        return getCustomer(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private int
    getCustomer(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getCustomer");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getCustomer(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public datetime
    getDeadline()
    {
        return getDeadline(null, false);
    }

    public datetime
    getDeadline(java.util.Map<String, String> __ctx)
    {
        return getDeadline(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private datetime
    getDeadline(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getDeadline");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getDeadline(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public String
    getDst()
    {
        return getDst(null, false);
    }

    public String
    getDst(java.util.Map<String, String> __ctx)
    {
        return getDst(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private String
    getDst(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getDst");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getDst(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public int
    getId()
        throws RecordNotCommitted
    {
        return getId(null, false);
    }

    public int
    getId(java.util.Map<String, String> __ctx)
        throws RecordNotCommitted
    {
        return getId(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private int
    getId(java.util.Map<String, String> __ctx, boolean __explicitCtx)
        throws RecordNotCommitted
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getId");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getId(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public String
    getSrc()
    {
        return getSrc(null, false);
    }

    public String
    getSrc(java.util.Map<String, String> __ctx)
    {
        return getSrc(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private String
    getSrc(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getSrc");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getSrc(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public OrderStatus
    getStatus()
    {
        return getStatus(null, false);
    }

    public OrderStatus
    getStatus(java.util.Map<String, String> __ctx)
    {
        return getStatus(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private OrderStatus
    getStatus(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getStatus");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getStatus(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public float
    getWeight()
    {
        return getWeight(null, false);
    }

    public float
    getWeight(java.util.Map<String, String> __ctx)
    {
        return getWeight(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private float
    getWeight(java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("getWeight");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                return __del.getWeight(__ctx);
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    save()
        throws DBError
    {
        save(null, false);
    }

    public void
    save(java.util.Map<String, String> __ctx)
        throws DBError
    {
        save(__ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    save(java.util.Map<String, String> __ctx, boolean __explicitCtx)
        throws DBError
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __checkTwowayOnly("save");
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.save(__ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setCustomer(int CustomerId)
    {
        setCustomer(CustomerId, null, false);
    }

    public void
    setCustomer(int CustomerId, java.util.Map<String, String> __ctx)
    {
        setCustomer(CustomerId, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setCustomer(int CustomerId, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setCustomer(CustomerId, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setDeadline(datetime deadline)
    {
        setDeadline(deadline, null, false);
    }

    public void
    setDeadline(datetime deadline, java.util.Map<String, String> __ctx)
    {
        setDeadline(deadline, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setDeadline(datetime deadline, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setDeadline(deadline, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setDst(String dst)
    {
        setDst(dst, null, false);
    }

    public void
    setDst(String dst, java.util.Map<String, String> __ctx)
    {
        setDst(dst, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setDst(String dst, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setDst(dst, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setSrc(String src)
    {
        setSrc(src, null, false);
    }

    public void
    setSrc(String src, java.util.Map<String, String> __ctx)
    {
        setSrc(src, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setSrc(String src, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setSrc(src, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setStatus(OrderStatus status)
    {
        setStatus(status, null, false);
    }

    public void
    setStatus(OrderStatus status, java.util.Map<String, String> __ctx)
    {
        setStatus(status, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setStatus(OrderStatus status, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setStatus(status, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public void
    setWeight(float weight)
    {
        setWeight(weight, null, false);
    }

    public void
    setWeight(float weight, java.util.Map<String, String> __ctx)
    {
        setWeight(weight, __ctx, true);
    }

    @SuppressWarnings("unchecked")
    private void
    setWeight(float weight, java.util.Map<String, String> __ctx, boolean __explicitCtx)
    {
        if(__explicitCtx && __ctx == null)
        {
            __ctx = _emptyContext;
        }
        int __cnt = 0;
        while(true)
        {
            Ice._ObjectDel __delBase = null;
            try
            {
                __delBase = __getDelegate(false);
                _orderDel __del = (_orderDel)__delBase;
                __del.setWeight(weight, __ctx);
                return;
            }
            catch(IceInternal.LocalExceptionWrapper __ex)
            {
                __handleExceptionWrapper(__delBase, __ex, null);
            }
            catch(Ice.LocalException __ex)
            {
                __cnt = __handleException(__delBase, __ex, null, __cnt);
            }
        }
    }

    public static orderPrx
    checkedCast(Ice.ObjectPrx __obj)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            try
            {
                __d = (orderPrx)__obj;
            }
            catch(ClassCastException ex)
            {
                if(__obj.ice_isA("::CustomerRelationsManagement::order"))
                {
                    orderPrxHelper __h = new orderPrxHelper();
                    __h.__copyFrom(__obj);
                    __d = __h;
                }
            }
        }
        return __d;
    }

    public static orderPrx
    checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            try
            {
                __d = (orderPrx)__obj;
            }
            catch(ClassCastException ex)
            {
                if(__obj.ice_isA("::CustomerRelationsManagement::order", __ctx))
                {
                    orderPrxHelper __h = new orderPrxHelper();
                    __h.__copyFrom(__obj);
                    __d = __h;
                }
            }
        }
        return __d;
    }

    public static orderPrx
    checkedCast(Ice.ObjectPrx __obj, String __facet)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
            try
            {
                if(__bb.ice_isA("::CustomerRelationsManagement::order"))
                {
                    orderPrxHelper __h = new orderPrxHelper();
                    __h.__copyFrom(__bb);
                    __d = __h;
                }
            }
            catch(Ice.FacetNotExistException ex)
            {
            }
        }
        return __d;
    }

    public static orderPrx
    checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
            try
            {
                if(__bb.ice_isA("::CustomerRelationsManagement::order", __ctx))
                {
                    orderPrxHelper __h = new orderPrxHelper();
                    __h.__copyFrom(__bb);
                    __d = __h;
                }
            }
            catch(Ice.FacetNotExistException ex)
            {
            }
        }
        return __d;
    }

    public static orderPrx
    uncheckedCast(Ice.ObjectPrx __obj)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            try
            {
                __d = (orderPrx)__obj;
            }
            catch(ClassCastException ex)
            {
                orderPrxHelper __h = new orderPrxHelper();
                __h.__copyFrom(__obj);
                __d = __h;
            }
        }
        return __d;
    }

    public static orderPrx
    uncheckedCast(Ice.ObjectPrx __obj, String __facet)
    {
        orderPrx __d = null;
        if(__obj != null)
        {
            Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
            orderPrxHelper __h = new orderPrxHelper();
            __h.__copyFrom(__bb);
            __d = __h;
        }
        return __d;
    }

    protected Ice._ObjectDelM
    __createDelegateM()
    {
        return new _orderDelM();
    }

    protected Ice._ObjectDelD
    __createDelegateD()
    {
        return new _orderDelD();
    }

    public static void
    __write(IceInternal.BasicStream __os, orderPrx v)
    {
        __os.writeProxy(v);
    }

    public static orderPrx
    __read(IceInternal.BasicStream __is)
    {
        Ice.ObjectPrx proxy = __is.readProxy();
        if(proxy != null)
        {
            orderPrxHelper result = new orderPrxHelper();
            result.__copyFrom(proxy);
            return result;
        }
        return null;
    }
}
